﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using PWA.PineWS;

namespace PWA
{
    public partial class SuitsAndAccessories : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Service1 WS = new Service1();
            Suits[] suit = WS.GetSuits();
            Accessories[] ac = WS.GetAccessories();
            drpSuits.Items.Add("---");
            for (int i = 0; i < suit.Length; i++)
            {
                drpSuits.DataSource = SqlDropDownSuits;
                drpSuits.Items.Add(suit[i].SuitName);
                drpSuits.DataBind();
                
            }
            
           
            for (int i = 0; i < ac.Length; i++)
            {
                rblAccessories.DataSource = SqlRblAccessories;
                rblAccessories.Items.Add(ac[i].AccName);
                rblAccessories.DataBind();
               
            }
            
             
        }

        protected void btnContinue_Click(object sender, EventArgs e)
        {
                

            Session.Add("suit", drpSuits.SelectedValue.ToString());
            Session.Add("acc", rblAccessories.SelectedValue.ToString());    
            //string order = Context.Items["suit"].ToString() + Context.Items["acc"].ToString();
            Server.Transfer ("~/InsertCustomer.aspx");
        }
    }
}
